﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace UtilsORM.MySqlData;

[MySqlCharSet("utf8mb3")]
[MySqlCollation("utf8mb3_general_ci")]
public partial class iot_device_software
{
    [Key]
    public long sw_id { get; set; }

    [StringLength(255)]
    public string sw_guid { get; set; }

    /// <summary>
    /// 绑定主机
    /// </summary>
    [StringLength(255)]
    public string sw_gw_guid { get; set; }

    /// <summary>
    /// 0待处理，1处理中，2正常完成，3异常
    /// </summary>
    public int? sw_status { get; set; }

    /// <summary>
    /// 指令
    /// </summary>
    [StringLength(50)]
    public string sw_command { get; set; }

    /// <summary>
    /// 服务名
    /// </summary>
    [StringLength(50)]
    public string sw_service_name { get; set; }

    /// <summary>
    /// 升级包地址
    /// </summary>
    [StringLength(50)]
    public string sw_packages_url { get; set; }

    /// <summary>
    /// 升级响应
    /// </summary>
    [StringLength(50)]
    public string sw_return_msg { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? sw_mod_time { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? sw_add_time { get; set; }

    /// <summary>
    /// 版本号
    /// </summary>
    [Required]
    [StringLength(10)]
    public string sw_version { get; set; }

    /// <summary>
    /// 绑定iot_device_software_publish
    /// </summary>
    [StringLength(50)]
    public string sw_swp_guid { get; set; }
}
